<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>${title}</title>
	<%@include file="/include/easyui.jsp" %>
	<script src="<%=cxtPath %>/resources/js/comm/comm.js"></script>
	<script src="<%=cxtPath %>/resources/js/${classnameL}/${classnameL}.js"></script>
</head>
<body class="easyui-layout">
	<div id="queryBar" >
		<form id="queryform" method="post" action="exportByExcel" target="iframe_export">
			<table>
${searchTr}
			</table>		
		</form>
	    <table>
	        <tr>
	            <td>
	                <a  href="javascript:search()" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
					<a  href="javascript:add()" class="easyui-linkbutton" data-options="iconCls:'icon-add'" >新增</a>
					<a  href="javascript:edit()" class="easyui-linkbutton" data-options="iconCls:'icon-edit'" >修改</a>
					<a  href="javascript:del()" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" >删除</a>
	            </td>
	            <td>
	                <div class="datagrid-btn-separator"></div>
	            </td>
	            <td>
					<a  href="javascript:downExcel('/${projectName}/resources/excel/${classnameL}.xlsx')" class="easyui-linkbutton" data-options="iconCls:'icon-excel'">模板下载</a>
					<a  href="javascript:exportExcel()" class="easyui-linkbutton" data-options="iconCls:'icon-excel'">导出</a>
					<a  href="javascript:importExcel()" class="easyui-linkbutton" data-options="iconCls:'icon-excel'">导入</a>
	            </td>
	        </tr>
	    </table>

	</div>
	<div region="center"  border="false">
		<table class="easyui-datagrid" title="${title}" id="${classnameL}List"
			data-options="rownumbers:true,singleSelect:true,width:'auto',fit:true,url:'query',pagination:true,
			 onLoadSuccess:function(){createTooltip('${classnameL}List');},pageSize:10,method:'get',toolbar:'#queryBar'">
		<thead>
			<tr>
${tableth}
			</tr>
		</thead>
	</table>
	</div>
	
	<div id="${classnameL}Win" class="easyui-dialog" title="编辑${title}" style="width:500px;height:400px;padding:10px"
			data-options="
				modal:true,closed:true,resizable:true,
				iconCls: 'icon-add',
				toolbar: [{
					text:'保存',
					iconCls:'icon-ok',
					handler:function(){
						save();
					}
				},'-',{
					text:'取消',
					iconCls:'icon-cancel',
					handler:function(){
						alert('save')
					}
				}],
				buttons: [{
					text:'保存',
					iconCls:'icon-ok',
					handler:function(){
						save();
					}
				},{
					text:'取消',
					iconCls:'icon-cancel',
					handler:function(){
						alert('cancel');;
					}
				}]
			">
		<form id="${classnameL}Form" class="easyui-form" method="post" style="width: 100%;height:100%">
			<input type="hidden" name="${pkPro}">
            <table style="border-spacing:0px 10px;width: 100%" >
${editTr}
	    	</table>
        </form>
	</div>
	<div id="excelWin" class="easyui-dialog" title="导入" style="width:400px;height:200px;padding:10px"
			data-options="
				modal:true,closed:true,resizable:true,
				iconCls: 'icon-add',
				toolbar: [{
					text:'导入',
					iconCls:'icon-ok',
					handler:function(){
						saveExcel();
					}
				}],
				buttons: [{
					text:'导入',
					iconCls:'icon-ok',
					handler:function(){
						saveExcel();
					}
				}]
			">
		<form id="uploadform" method="post" enctype="multipart/form-data">
			<input type="file"  name="excelFile" id="excelFile" style="width:80%">
		</form>
	</div>
	<iframe id="iframe_export" name ="iframe_export" style="width: 0px;height: 0px;"></iframe>
</body>
</html>